package com.cfpl.admin_service.mapper;

import com.cfpl.admin_service.VO.AvailableFertilizer;
import com.cfpl.admin_service.VO.FertilizationDetails;
import com.cfpl.project_common.pojo.FertilizerAcquireRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cfpl.project_common.pojo.FertilizerUsageRecords;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 14720
* @description 针对表【fertilizer_acquire_record(肥料领取记录表)】的数据库操作Mapper
* @createDate 2023-10-17 14:29:56
* @Entity com.cfpl.project_common.pojo.FertilizerAcquireRecord
*/
@Mapper
public interface FertilizerAcquireRecordMapper extends BaseMapper<FertilizerAcquireRecord> {

    /**
     * 更新肥料领取信息
     * @param fertilizerUsageRecords 更新信息
     */
    boolean updateFertilizerUsage(@Param("fertilizerUsageRecords") FertilizerUsageRecords fertilizerUsageRecords);

    /**
     * 根据肥料领取记录查询本次所有的施肥记录
     * @param id 肥料领取记录
     * @return 本次所有的施肥记录
     */
    List<FertilizationDetails> queryUsageRecordByAcquireRecord(@Param("id")Long id);

    /**
     * 查询当前培育人员可使用的肥料信息列表
     * @param adminId 培育人员编号
     * @return 可使用的肥料信息列表
     */
    List<AvailableFertilizer> queryAvailableFertilizerList(@Param("adminId") Long adminId);



}




